package com.gopay.common.domain.logging.console;

import com.gopay.common.domain.BaseEntity;
import com.gopay.common.util.DateUtils;

/**
 * 用户操作日志
 * 
 * @BaseMemberLog.java
 * @author yaobo
 * @2013-7-18 下午04:49:30 www.gopay.com.cn Inc.All rights reserved.
 */
public class BaseMemberLog extends BaseEntity {

    /**
     * 
     */
    private static final long serialVersionUID = -2532973121653792672L;

    /**
     * 操作员编号
     */
    private int oprId;

    /**
     * 操作员名称
     */
    private String oprName;

    /**
     * 触发目标类
     */
    private String target;

    /**
     * 触发地址
     */
    private String webappPath;

    /**
     * 唯一标识
     */
    private String tkey;

    /**
     * 操作时间
     */
    private String date;

    /**
     * 描述
     */
    private String description;

    public String getTkey() {
        return tkey;
    }

    public void setTkey(String tkey) {
        this.tkey = tkey;
    }

    public int getOprId() {
        return oprId;
    }

    public void setOprId(int oprId) {
        this.oprId = oprId;
    }

    public String getOprName() {
        return oprName;
    }

    public void setOprName(String oprName) {
        this.oprName = oprName;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getWebappPath() {
        return webappPath;
    }

    public void setWebappPath(String webappPath) {
        this.webappPath = webappPath;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        StringBuffer log = new StringBuffer();

        log.append(DateUtils.getCurrDate());
        log.append(" ");
        log.append(oprName);
        log.append(" ");
        log.append(oprId);
        log.append(" ");
        log.append("发起:" + description + "操作");
        log.append(" ");
        log.append(webappPath);
        log.append(" ");
        log.append(target);

        return log.toString();
    }
}
